package com.idanchuang.component.mybatis.plus.config;

/**
 * @author yjy
 * @date 2020/8/17 14:13
 **/
public class MybatisConfigBean {

    /** 是否启用查询限制 */
    private boolean enableLimit = true;
    /** 单次查询最大返回条数 */
    private int maxLimit = 10000;
    /** 是否打印sql执行时间 */
    private boolean logRt = false;
    /** sql执行时间指标名称 */
    private String rtMetricName = "appSqlRt";
    /** 慢sql基准, 毫秒 */
    private int slowTime = 50;

    public int getMaxLimit() {
        return maxLimit;
    }

    public void setMaxLimit(int maxLimit) {
        this.maxLimit = maxLimit;
    }

    public boolean isLogRt() {
        return logRt;
    }

    public boolean isEnableLimit() {
        return enableLimit;
    }

    public void setEnableLimit(boolean enableLimit) {
        this.enableLimit = enableLimit;
    }

    public String getRtMetricName() {
        return rtMetricName;
    }

    public void setRtMetricName(String rtMetricName) {
        this.rtMetricName = rtMetricName;
    }

    public void setLogRt(boolean logRt) {
        this.logRt = logRt;
    }

    public int getSlowTime() {
        return slowTime;
    }

    public void setSlowTime(int slowTime) {
        this.slowTime = slowTime;
    }

    @Override
    public String toString() {
        return "MybatisConfigBean{" +
                "enableLimit=" + enableLimit +
                ", maxLimit=" + maxLimit +
                ", logRt=" + logRt +
                ", rtMetricName='" + rtMetricName + '\'' +
                ", slowTime=" + slowTime +
                '}';
    }
}
